<?php
include("../service/bannerService.php");
include("../util/constant.php");

$proId = $_POST["product"];
$status = $_POST["status"];
$type = 5;
$image = $_POST["image"];
$bannerId = $_POST["newProductBannerId"];

if(updateNewProductBanner($image, $type, $status, $proId, $bannerId)){
	echo "<script>window.location.href = '../admin/new-product-banner-detail.php?action=".UPDATE_SUCCESSFULLY."&id=".$bannerId."';</script>";
} else {
	echo "<script>window.location.href = '../admin/new-product-banner-detail.php?action=".UPDATE_FAILED."&id=".$bannerId."';</script>";
}
?>